﻿/*
 * This software is the confidential and proprietary
 * information of NetBay
 * Such confidential information should not be disclosed
 * NetBay copyright(c) 2010
 */

#region Using
using System.ServiceModel.DomainServices.Hosting;
using System.ServiceModel.DomainServices.Server;
using Rio.Framework.RioManager;
using System.Web;
#endregion

namespace Rio.Applications.Web.Services
{
    // TODO: Create methods containing your application logic.
    [EnableClientAccess(RequiresSecureEndpoint = false)]
    public class SettingsDomainService : DomainService
    {
        /// <summary>
        /// Return the specified settings
        /// </summary>
        /// <returns>The value of the setting</returns>
        [Invoke]
        public int GetRioAuthentication()
        {
            return SettingsManager.cStoreSettings.Authentification_Rio;
        }

        //[Invoke]
        //public string GetRioVersion()
        //{
        //    return SettingsManager.cStoreSettings.Update_RioCurrentVersion;
        //}

        [Invoke]
        public string GetPathStorageImages()
        {
            return SettingsManager.cStoreSettings.Parameter_Storage;
        }

        [Invoke]
        public string GetPathStorageThumnail()
        {
            return SettingsManager.cStoreSettings.Thumbnail_Directory;
        }

        [Invoke]
        public string GetPathRioscanFileUser()
        {
            return SettingsManager.cStoreSettings.Login_PathRioscanUser;
        }

        [Invoke]
        public bool GetDefaultDisplayMode()
        {
            return SettingsManager.cStoreSettings.Thumbnail_DefaultDisplayMode;
        }

        [Invoke]
        public string GetRefreshScanGuid()
        {
            return HttpContext.Current.Session["RefreshScanGuid"].ToString();
        }

        [Invoke]
        public string GetScanMSI()
        {
            return SettingsManager.cStoreSettings.ScanMSI;
        }

        [Invoke]
        public int GetHistoricMaxCountResultsDisplay()
        {
            return SettingsManager.cStoreSettings.Parameter_HistoricMaxCountResultsDisplay;
        }

        [Invoke]
        public bool GetKeepCriteria()
        {
            return SettingsManager.cStoreSettings.Parameter_KeepCriteria;
        }

        [Invoke]
        public bool GetFitToheight()
        {
            return SettingsManager.cStoreSettings.Parameter_Viewer_FitToHeigh;
        }

        [Invoke]
        public double GetZoomStep()
        {
            return SettingsManager.cStoreSettings.Parameter_Viewer_ZoomStep;
        }
    }
}